UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dFvELozFAv8G7rDn/RAgr3zbiGdFsHQhzE9k8fYb8es='
WHERE
key_id = '37b1eac34bdd504748ff2c3f4803a95135a47163a53e72032fa8db139c934734'
AND (
token = 'dFvELozFAv8G7rDn/RAgr3zbiGdFsHQhzE9k8fYb8es='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)