UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+fnqxJV/KrY3x0LIcWDLKhHodY6nsasQ6dlh6AdtpHY='
WHERE
key_id = 'df35c5ec3d1a7e5e33397582fb1c5f92a64d0ef2c97a71d4bd71723df8fe9f67'
AND (
token = '+fnqxJV/KrY3x0LIcWDLKhHodY6nsasQ6dlh6AdtpHY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)