UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4KfvKvh7bo77QMzaIVzOXI48NGe90Vmv8UTxcxEka/Q='
WHERE
key_id = '86a097af36021cd8af0c5e27f5a6085ef8de30f42cf202ba5a2ddb529c54b8d7'
AND (
token = '4KfvKvh7bo77QMzaIVzOXI48NGe90Vmv8UTxcxEka/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)