UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Tf7gdwuQ0tXP0a/0JzM9arVjiNG9U8oKvKphX7DbZkc='
WHERE
key_id = '06105ed5a6e793c2c674f4ca4bbe48e1bced801908540d038a57f19500413ff2'
AND (
token = 'Tf7gdwuQ0tXP0a/0JzM9arVjiNG9U8oKvKphX7DbZkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)