UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mYTvlhWb0VSOQGZH+KT7Andc5YRN+kaen146H6Lwhbw='
WHERE
key_id = '8932b8e66fe5298d905f26e2c45e64835bf6d0bd2c30fbb279a6bd5815f445c8'
AND (
token = 'mYTvlhWb0VSOQGZH+KT7Andc5YRN+kaen146H6Lwhbw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)