UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eCkNtapHraWveshkc00Q6aotoZfyNbklfAEUoYks1PY='
WHERE
key_id = '4f88cf7511dce4bf5a4d161de7ade5f3b66311d7ec0ecefab6d4abbf8fbe7150'
AND (
token = 'eCkNtapHraWveshkc00Q6aotoZfyNbklfAEUoYks1PY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)