UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+DCg7nAoxGT8591DE5S73Io17Fp5OZ+eA9Ol9eR02HY=' 
WHERE 
  key_id = '49b3f00b98fefc5b58b205b899aa789cd4852e795206b6efda7906f4e3c3ce2f' 
  AND (
    token = '+DCg7nAoxGT8591DE5S73Io17Fp5OZ+eA9Ol9eR02HY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033