UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3Y/buLqflPISd4Xs6i8uej0WBgAdxdP2GmkWWhnqLak=' 
WHERE 
  key_id = '0b5ae914dfdce8d4b149c75e574ade5e15f480d7094451a306e6a0bb489c61bc' 
  AND (
    token = '3Y/buLqflPISd4Xs6i8uej0WBgAdxdP2GmkWWhnqLak=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025