UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ITxAxePzgaLeAUpAARGsIwlbca5qK+HF08BSKT15iQY=' 
WHERE 
  key_id = 'c6cea7f8ff6a8092130c6973391cd172484b6f61dac0c44220df564e3320e2ec' 
  AND (
    token = 'ITxAxePzgaLeAUpAARGsIwlbca5qK+HF08BSKT15iQY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029