UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+iwPw876GoeXTiwizJLQXhMoXgVFP7Yi5yx5/tCWELM='
WHERE
key_id = '603744ecad0a61b57909db6bc0ffed5686c0fad535f1b78f7540954dd6a158a2'
AND (
token = '+iwPw876GoeXTiwizJLQXhMoXgVFP7Yi5yx5/tCWELM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)