UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5CzxPflPjgwsQjQqWBkcw0pF1RXqzMKxpUBE6bBNtXA=' 
WHERE 
  key_id = 'ad283cdb9da20a618fcf7692af4bc5906db8f3843e5bbd08f739e0396e910b2e' 
  AND (
    token = '5CzxPflPjgwsQjQqWBkcw0pF1RXqzMKxpUBE6bBNtXA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030