UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TOI7+Dovsih9gHJ+4iDa3Yq5QTC2g/Wb9SKdGt0ewBc='
WHERE
key_id = '301d03a86e4f0ddbbece90d89ad5ddeff7d082cd2ee862331381a96e3559fe53'
AND (
token = 'TOI7+Dovsih9gHJ+4iDa3Yq5QTC2g/Wb9SKdGt0ewBc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)