UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1+0bpAYSg9VOYNIQ/rV5FhqJxo0QU//4QvrRWGJ8Cng='
WHERE
key_id = '453fc7225e6536778ff31db86bf148dcaf5b9f118163ce3880274adadf4afab3'
AND (
token = '1+0bpAYSg9VOYNIQ/rV5FhqJxo0QU//4QvrRWGJ8Cng='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)