UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mjmhmAWqHMHzXCZwjRRp/dwhWGMRYCiFhP8/KuxqDZw=' 
WHERE 
  key_id = 'ee5be2e707043d099d4bc77cd03b6370ef0ccd7fae76d581cb9685d8ab7d4c73' 
  AND (
    token = 'mjmhmAWqHMHzXCZwjRRp/dwhWGMRYCiFhP8/KuxqDZw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018