UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/3kgCkUNzbau7aWIdgoMMVN0qjeUA0OkBfenpBqbZaE='
WHERE
key_id = '54c657cdeb1dfe37b423e4016f2fb2929447e1ac5d9864d7c0ce4035106d5fa4'
AND (
token = '/3kgCkUNzbau7aWIdgoMMVN0qjeUA0OkBfenpBqbZaE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)