UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '432qKCcdjtbRcjugMOVcLtvI9qcUYBYiLz2yXq+t28w='
WHERE
key_id = '265c9f1b94dc97fa6af521fd46bdad1fe7aa7386dbb521eea105598aa6491f46'
AND (
token = '432qKCcdjtbRcjugMOVcLtvI9qcUYBYiLz2yXq+t28w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)