UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pxL7krXTO/+Stl2Nb7lVqWFPLpDzc3ClnJmYtgxjRmU='
WHERE
key_id = '86b0b9b8168a64dcc34e08b62a099a791bd09d89261346453a680a23ad08b302'
AND (
token = 'pxL7krXTO/+Stl2Nb7lVqWFPLpDzc3ClnJmYtgxjRmU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)