UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0sgvzPzyNuVdqFFQiBWH/2bahylvFEO6ZzeqkyTEq/s='
WHERE
key_id = '68e6a8aeda2fd44a2b03df28d29720c07aa1a9596ae8d0a5e220e4f648220701'
AND (
token = '0sgvzPzyNuVdqFFQiBWH/2bahylvFEO6ZzeqkyTEq/s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)