UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2SzGymeEI2tWTLpatnX6jg8HG3QYTTIQhreInBgJjTY='
WHERE
key_id = '7bd479a3faa1c8929a1ece6bf1e9d3635e83cf0e53e43644c664d723528ee92c'
AND (
token = '2SzGymeEI2tWTLpatnX6jg8HG3QYTTIQhreInBgJjTY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)