UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YSMEog8AMrJeBXjigHXnVb4b1wFEZ1AFneNJ/JoU5LA='
WHERE
key_id = '9cfbd8d4e53d6f058af5e52461186cb7238c11ca7a2fc743e7bba6e2c67b8ba8'
AND (
token = 'YSMEog8AMrJeBXjigHXnVb4b1wFEZ1AFneNJ/JoU5LA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)