UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1muQE9Vw+j+P04n3AC8yeFTKDPS5aeI9tIhnmQfIROo='
WHERE
key_id = '15ee40308d72e66656f36940a3164db94d0dfde852387b96d3f48fa1686882fa'
AND (
token = '1muQE9Vw+j+P04n3AC8yeFTKDPS5aeI9tIhnmQfIROo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)