UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '737FSh0/FjgLzDiur83HopcDUEbHxnqs5qEKJ5T+cLA=' 
WHERE 
  key_id = 'f728b05b03a7a665dd73edbd3da8cea73f2744f64b7fb327dd82619fcd7c0242' 
  AND (
    token = '737FSh0/FjgLzDiur83HopcDUEbHxnqs5qEKJ5T+cLA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034