UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XQ+3Aa4HnwlPOmg93RWbd3J5Qurc7EUuBBv/mOjxP5o='
WHERE
key_id = 'aa8535c8c67c62e3c0a3baa4b5f4ae187a3803885b9c3389eb186b9a74362aae'
AND (
token = 'XQ+3Aa4HnwlPOmg93RWbd3J5Qurc7EUuBBv/mOjxP5o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)