UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '71Q4pmgVLBTBNiMQWeDc3HKKrCWCJ7Xn/JpPXMUm3+0='
WHERE
key_id = '8e9d3c8ede042cb140ed18cca887c423ce05ff7c0d01ad5a20236bd6fc1e6d21'
AND (
token = '71Q4pmgVLBTBNiMQWeDc3HKKrCWCJ7Xn/JpPXMUm3+0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)