UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v0vuXK0HV/UB4GN/x8J38NxE4JX0gAdnfCfTZEfxF6c='
WHERE
key_id = '8ec9cb5ed86a062e36ba425ea04dbae02fbb6cfd4061ca7f79b7f11dd07dab64'
AND (
token = 'v0vuXK0HV/UB4GN/x8J38NxE4JX0gAdnfCfTZEfxF6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)