UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's+JmcrZ28Fmm6q/antGO0fasYg7Pe6MOC0KW8hTwn6o='
WHERE
key_id = '06bdfa307063ead1c9becc989eb728b6800dcd82aafbd88c9834546b44e86f08'
AND (
token = 's+JmcrZ28Fmm6q/antGO0fasYg7Pe6MOC0KW8hTwn6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)