UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EUVkUQO0PTGFFgsQA/XoF1UjuPxqFimxZsTnlLMMox8=' 
WHERE 
  key_id = 'c9326556146c69bbfd3a2a7c7ca8cfbe00cf3cee379bb6b11bfc34c3b9dab378' 
  AND (
    token = 'EUVkUQO0PTGFFgsQA/XoF1UjuPxqFimxZsTnlLMMox8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039