UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PfLFuBVNt2UvVZQvvNyEHtCBuHgboX4AZJUUnaM2/Kc='
WHERE
key_id = 'c97839c776c8a5cd5c664b1c63820d6c70ce79cf385d2c6a6a8f7f4af96f62ae'
AND (
token = 'PfLFuBVNt2UvVZQvvNyEHtCBuHgboX4AZJUUnaM2/Kc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)