UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5NFR1reoBkeuVxoZTJwOU9+aqKgsocaU56Y51fn8Wno=' 
WHERE 
  key_id = '63bca2fc95430b772354eb3c0e5026672e71c0dc24f0b217670a71519b8a5c68' 
  AND (
    token = '5NFR1reoBkeuVxoZTJwOU9+aqKgsocaU56Y51fn8Wno=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036