UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FMPmyNQjApa/9CPNX68ghASY/khQOPAQBV6xiwjDGGg=' 
WHERE 
  key_id = '93405f90b6ec2bfe9e1d898e7547ed02280af0d16dd87a5235ecad40ca079d97' 
  AND (
    token = 'FMPmyNQjApa/9CPNX68ghASY/khQOPAQBV6xiwjDGGg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034