UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MjKBfzpvI/3/o9mPzE1Eo273ZMtxKu2ilv92KM2UuKs=' 
WHERE 
  key_id = '5fb2ea82704b7143ee365f223f34bb67f85e49e078003d389548746ab82f6d5d' 
  AND (
    token = 'MjKBfzpvI/3/o9mPzE1Eo273ZMtxKu2ilv92KM2UuKs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025