UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ps5tsTfGiKpVLcxY6vtGbRJcCDMi9Gd00pDij96B4ZU=' 
WHERE 
  key_id = '06c8029085a26da5a90400089d79fdc481e64a5d1b1640de00070bb8a16ccb20' 
  AND (
    token = 'ps5tsTfGiKpVLcxY6vtGbRJcCDMi9Gd00pDij96B4ZU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021