UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MPtyPW1o3rXTagsIJQY7A3ocIvr5+pdtlcCBhKbGK9U='
WHERE
key_id = '72015a0c055e291097f8a6cc1d3635eda1a89eb2ba113e05727d08461f713e97'
AND (
token = 'MPtyPW1o3rXTagsIJQY7A3ocIvr5+pdtlcCBhKbGK9U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)