UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/3S5+yKgNiFAl0CnCKg9fVhopm144CEvDsWHj1uGdxA='
WHERE
key_id = '25367584ef9e8375685a8c9008bbe1698c7b35d21b7edc3cffed9c3921edb687'
AND (
token = '/3S5+yKgNiFAl0CnCKg9fVhopm144CEvDsWHj1uGdxA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)