UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OHmCQCDLGY7x0+ZncPUHQsK62FRKTLyGWY3OPWhAZMw=' 
WHERE 
  key_id = '241ca4575f9bb94ae4e0d57404a01dab2943a19d7b5f21f3bb894db4ce5b8fde' 
  AND (
    token = 'OHmCQCDLGY7x0+ZncPUHQsK62FRKTLyGWY3OPWhAZMw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031