UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wvHWE0+lXDhU83ooqHSuMRGVOpt9PIZZLqfU5b+C14I=' 
WHERE 
  key_id = '7326cb78ae0ed6dee8608b4b81b6142349a018a8cbc8c62b9b50e0116c8e1c46' 
  AND (
    token = 'wvHWE0+lXDhU83ooqHSuMRGVOpt9PIZZLqfU5b+C14I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026