UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jaxz+eC+d6fA6vnYYJpZp5XmBVNRAc8A7GlemSJPVGc='
WHERE
key_id = '9e489262c12e464cce62997c217810c196a04539fe9f035253bb8ec008fddd51'
AND (
token = 'jaxz+eC+d6fA6vnYYJpZp5XmBVNRAc8A7GlemSJPVGc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)