UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vL/oW1aWxlCXEAzqNJWfOmgSNqQWRDLz7VXuEXNZqMY=' 
WHERE 
  key_id = '75688b1c2bb3d81d23e7201977dc65ae39a1f26cbff38ec0608b5bac215cb63b' 
  AND (
    token = 'vL/oW1aWxlCXEAzqNJWfOmgSNqQWRDLz7VXuEXNZqMY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021