UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mD625LpoaconBD+j29IVUPnp4hfc5mqdr84DCr8vs1o='
WHERE
key_id = '3c84500066c904191d98291164a37319035cc3361886709d50f19437b722433e'
AND (
token = 'mD625LpoaconBD+j29IVUPnp4hfc5mqdr84DCr8vs1o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)