UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V5uuh9uZVJM8q6VhZcVkzlrFjPaITxV4O+SR8SQSrCI=' 
WHERE 
  key_id = '92cd8bb57aa64c4abda5aae7b026ca1de2382a81ddff5d0407a25ef611d32bee' 
  AND (
    token = 'V5uuh9uZVJM8q6VhZcVkzlrFjPaITxV4O+SR8SQSrCI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017