UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZF4jg512jYYWwsp8wPv5SJW/ZsZcnLMMvhFsHs6/eqg=' 
WHERE 
  key_id = '69cd41b856a05ea87726b0224e25abbf8b7364ab2956bc934c9a9a2976643ec6' 
  AND (
    token = 'ZF4jg512jYYWwsp8wPv5SJW/ZsZcnLMMvhFsHs6/eqg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030