UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '672vCq0aEMBI/gsRaowxCpXmeVUiQCCJid/+JvehuAc='
WHERE
key_id = '6b022ec9faae148f7dcc1668efe319e0fbe1c08bf04e2abe2b9ae42cf30eee7f'
AND (
token = '672vCq0aEMBI/gsRaowxCpXmeVUiQCCJid/+JvehuAc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)