UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9xel6YuOi1Jx6l6oNNd2DhLXNDMQE88owBOKqSWS7t0='
WHERE
key_id = '952e41f2024aba820fa40e05f8ba255f5aeb994a6af163f69be6c363c4b62673'
AND (
token = '9xel6YuOi1Jx6l6oNNd2DhLXNDMQE88owBOKqSWS7t0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)