UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '28wANfe71gMhL+0y7rP8ZMoZgwmxsjlPIuYJkmQqFa8='
WHERE
key_id = '6e127806ecb348106f1f3c6ff3746f1b2985c4f20774fa5494eb4e24e0f093a4'
AND (
token = '28wANfe71gMhL+0y7rP8ZMoZgwmxsjlPIuYJkmQqFa8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)