UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '30IuxGLvncRBp4ooHL5tiTE31qhOrdBXAWPik9AObSg='
WHERE
key_id = '23ca280eb4a2e5dad44aef2733e5d2d6cd55364510e724ece9558040ddeb487c'
AND (
token = '30IuxGLvncRBp4ooHL5tiTE31qhOrdBXAWPik9AObSg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)