UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MoHWSz/tgu8XXXnvgwCYiYmoX8jVrmH4f8HShhXkJKQ='
WHERE
key_id = '550c90a92b5ea97f856c8775886fbfd335b082d268f35a2e40d595459eeafae2'
AND (
token = 'MoHWSz/tgu8XXXnvgwCYiYmoX8jVrmH4f8HShhXkJKQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)