UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1eaVsDyzFkdSWOLHVHSY1zXIwWc4m8MZjKOaQ3lsxso=' 
WHERE 
  key_id = '6448d93fe6fdb1f2e78d513faeff9ee31a74717c7aa09e94ec726b4760c4accc' 
  AND (
    token = '1eaVsDyzFkdSWOLHVHSY1zXIwWc4m8MZjKOaQ3lsxso=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046