UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FFWlnnIi0TofcT9bhtt8HjETGFBwA+BA5Xdxhq/A7EU='
WHERE
key_id = '1f7d3f9f31718c659ebeea48abefea36aebd66a1e7283c0c4cf0d8b26d99ad76'
AND (
token = 'FFWlnnIi0TofcT9bhtt8HjETGFBwA+BA5Xdxhq/A7EU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)