UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V88/eezu1RVSqVX7NcK9nbt79VCnYcga33N4QK0FXzg='
WHERE
key_id = '7f634d208b51542994ca723cbe4edc332e4de20fa889aad66c2f8914bb858a41'
AND (
token = 'V88/eezu1RVSqVX7NcK9nbt79VCnYcga33N4QK0FXzg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)