UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 300, 
  token = '6OK4GExNLgvSTKbFEZLwGYg0mUA9eVdoO0BqHnCgxag=' 
WHERE 
  key_id = 'fc5f6f6103723e4126ede1fa510cbb4a91cc4cad8c8e4e4fb622f53d42b560aa' 
  AND (
    token = '6OK4GExNLgvSTKbFEZLwGYg0mUA9eVdoO0BqHnCgxag=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032