UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rc4bU4B3qDPElYOF8r5CG0/Uo/W72d5xA+YNkkigoFM='
WHERE
key_id = '3e300323015d5c4755f78bf914e794f84a7d8ac578f1ad13156fd9ba0cbd1a49'
AND (
token = 'rc4bU4B3qDPElYOF8r5CG0/Uo/W72d5xA+YNkkigoFM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)