UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9z75/+Xy1sWQaoUZMciWnDoYURlF4p0huv6SpBQ/5yw='
WHERE
key_id = '90be5ed22d154ade005449e54575426756aadbd22a59cf353a8beedc8323e67e'
AND (
token = '9z75/+Xy1sWQaoUZMciWnDoYURlF4p0huv6SpBQ/5yw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)